package com.ia2014.tp.portal2.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet para autenticar al usuario
 * @author Diego Alejandro
 *
 */
@WebServlet("/home")
public class HomeServlet extends HttpServlet{
	private static final long serialVersionUID = 1L;
		
	public HomeServlet(){
		super();
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		this.process(req, resp);
	}
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		this.process(req, resp);
	}	

	private void process(HttpServletRequest req, HttpServletResponse resp) 
			throws ServletException, IOException{
		
		String redirect = "portal";	
		resp.sendRedirect(redirect);
	}	
}
